{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "QUANTAXIS>> start QUANTAXIS\n",
      "QUANTAXIS>> Welcome to QUANTAXIS, the Version is 1.0.65\n",
      "QUANTAXIS>>  \n",
      " ```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      "  ``########`````##````````##``````````##`````````####````````##```##########````````#``````##``````###```##`````######`` \n",
      "  `##``````## ```##````````##`````````####````````##`##```````##```````##```````````###``````##````##`````##```##`````##` \n",
      "  ##````````##```##````````##````````##`##````````##``##``````##```````##``````````####```````#```##``````##```##``````## \n",
      "  ##````````##```##````````##```````##```##```````##```##`````##```````##`````````##`##```````##`##```````##````##``````` \n",
      "  ##````````##```##````````##``````##`````##``````##````##````##```````##````````##``###```````###````````##`````##`````` \n",
      "  ##````````##```##````````##``````##``````##`````##`````##```##```````##```````##````##```````###````````##``````###```` \n",
      "  ##````````##```##````````##`````##````````##````##``````##``##```````##``````##``````##`````##`##```````##````````##``` \n",
      "  ##````````##```##````````##````#############````##```````##`##```````##`````###########`````##``##``````##`````````##`` \n",
      "  ###```````##```##````````##```##```````````##```##```````##`##```````##````##`````````##```##```##``````##```##`````##` \n",
      "  `##``````###````##``````###``##`````````````##``##````````####```````##```##``````````##``###````##`````##````##`````## \n",
      "  ``#########``````########```##``````````````###`##``````````##```````##``##````````````##`##``````##````##`````###``### \n",
      "  ````````#####`````````````````````````````````````````````````````````````````````````````````````````````````````##``  \n",
      "  ``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      "  ``````````````````````````Copyright``yutiansut``2018``````QUANTITATIVE FINANCIAL FRAMEWORK````````````````````````````` \n",
      "  ``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      " ```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      " ```````````````````````````````````````````````````````````````````````````````````````````````````````````````````````` \n",
      " \n"
     ]
    }
   ],
   "source": [
    "import QUANTAXIS as QA\n",
    "import threading"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "user = QA.QA_Portfolio()\n",
    "# 创建两个account\n",
    "\n",
    "a_1 = user.new_account()\n",
    "a_2 = user.new_account()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "< QA_Order realorder_id Order_AL6vVPeQ datetime:2017-12-14 09:31:00 code:000001 amount:900 price:10 towards:1 btype:stock_cn order_id:Order_AL6vVPeQ account:Acc_fihwWguQ status:300 >"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "user.get_account(a_1).send_order(money=10000,price=10, amount_model=QA.AMOUNT_MODEL.BY_MONEY,\n",
    "                    time='2017-12-14', code='000001', order_model=QA.ORDER_MODEL.CLOSE, towards=QA.ORDER_DIRECTION.BUY)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "< QA_Account Acc_fihwWguQ>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<QA_Market with ['backtest'] QA_Broker >\n"
     ]
    }
   ],
   "source": [
    "\n",
    "# 创建一个交易前置\n",
    "market = QA.QA_Market()\n",
    "# 交易前置连接broker \n",
    "market.start()\n",
    "market.connect(QA.RUNNING_ENVIRONMENT.BACKETEST)\n",
    "\n",
    "# 打印market\n",
    "print(market)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<_MainThread(MainThread, started 17312)>,\n",
       " <Thread(Thread-4, started daemon 3452)>,\n",
       " <Heartbeat(Thread-5, started daemon 24112)>,\n",
       " <HistorySavingThread(IPythonHistorySavingThread, started 20508)>,\n",
       " <ParentPollerWindows(Thread-3, started daemon 900)>,\n",
       " <Thread(pymongo_server_monitor_thread, started daemon 5784)>,\n",
       " <Thread(pymongo_kill_cursors_thread, started daemon 26348)>,\n",
       " <Thread(pymongo_kill_cursors_thread, started daemon 22556)>,\n",
       "  <QA_ENGINE with ['backtest'] kernels>,\n",
       " <QA_Threadbacktest  id=2302272337736>]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "threading.enumerate()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "market.connect(QA.RUNNING_ENVIRONMENT.SIMULATION)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<_MainThread(MainThread, started 17312)>,\n",
       " <Thread(Thread-4, started daemon 3452)>,\n",
       " <Heartbeat(Thread-5, started daemon 24112)>,\n",
       " <HistorySavingThread(IPythonHistorySavingThread, started 20508)>,\n",
       " <ParentPollerWindows(Thread-3, started daemon 900)>,\n",
       " <Thread(pymongo_server_monitor_thread, started daemon 5784)>,\n",
       " <Thread(pymongo_kill_cursors_thread, started daemon 26348)>,\n",
       " <Thread(pymongo_kill_cursors_thread, started daemon 22556)>,\n",
       "  <QA_ENGINE with ['backtest', 'simulation'] kernels>,\n",
       " <QA_Threadbacktest  id=2302272337736>,\n",
       " <QA_Threadsimulation  id=2302163118120>]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "threading.enumerate()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'backtest'"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "QA.RUNNING_ENVIRONMENT.BACKETEST"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['Acc_fihwWguQ', 'Acc_blCX6GQy']\n"
     ]
    }
   ],
   "source": [
    "# 登陆交易\n",
    "market.login(QA.RUNNING_ENVIRONMENT.BACKETEST,a_1.account_cookie)\n",
    "market.login(QA.RUNNING_ENVIRONMENT.BACKETEST,a_2.account_cookie)\n",
    "# 打印市场中的交易账户\n",
    "print(market.get_account_cookie())\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "import threading\n",
    "threading.enumerate()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "< QA_Order realorder_id Order_CxfKb7A8 datetime:2017-12-14 09:31:00 code:000001 amount:700 price:13.0 towards:1 btype:stock_cn order_id:Order_CxfKb7A8 account:Acc_fihwWguQ status:300 >\n"
     ]
    }
   ],
   "source": [
    "market.insert_order(account_cookie=a_1.account_cookie, amount=0,money=10000,price=10, amount_model=QA.AMOUNT_MODEL.BY_MONEY,time='2017-12-14', code='000001',frequence=QA.FREQUENCE.DAY, order_model=QA.ORDER_MODEL.CLOSE, towards=QA.ORDER_DIRECTION.BUY, market_type=QA.MARKET_TYPE.STOCK_CN,broker_name=QA.BROKER_TYPE.BACKETEST)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "< QA_Order realorder_id Order_yzdenutm datetime:2017-12-14 09:31:00 code:000001 amount:700 price:13.0 towards:1 btype:stock_cn order_id:Order_yzdenutm account:Acc_blCX6GQy status:300 >\n"
     ]
    }
   ],
   "source": [
    "market.insert_order(account_cookie=a_2.account_cookie, amount=0,money=10000,price=10, amount_model=QA.AMOUNT_MODEL.BY_MONEY,time='2017-12-14', code='000001',frequence=QA.FREQUENCE.DAY, order_model=QA.ORDER_MODEL.CLOSE, towards=QA.ORDER_DIRECTION.BUY, market_type=QA.MARKET_TYPE.STOCK_CN,broker_name=QA.BROKER_TYPE.BACKETEST)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#market.order_handler.order_queue.settle()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>account_cookie</th>\n",
       "      <th>amount</th>\n",
       "      <th>amount_model</th>\n",
       "      <th>callback</th>\n",
       "      <th>code</th>\n",
       "      <th>commission_coeff</th>\n",
       "      <th>date</th>\n",
       "      <th>datetime</th>\n",
       "      <th>frequence</th>\n",
       "      <th>market_type</th>\n",
       "      <th>...</th>\n",
       "      <th>realorder_id</th>\n",
       "      <th>sending_time</th>\n",
       "      <th>status</th>\n",
       "      <th>strategy</th>\n",
       "      <th>tax_coeff</th>\n",
       "      <th>towards</th>\n",
       "      <th>trade_id</th>\n",
       "      <th>transact_time</th>\n",
       "      <th>type</th>\n",
       "      <th>user</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>order_id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Order_CxfKb7A8</th>\n",
       "      <td>Acc_fihwWguQ</td>\n",
       "      <td>700</td>\n",
       "      <td>by_money</td>\n",
       "      <td>&lt;bound method QA_Account.receive_deal of &lt; QA_...</td>\n",
       "      <td>000001</td>\n",
       "      <td>0.00025</td>\n",
       "      <td>2017-12-14</td>\n",
       "      <td>2017-12-14 09:31:00</td>\n",
       "      <td>day</td>\n",
       "      <td>stock_cn</td>\n",
       "      <td>...</td>\n",
       "      <td>Order_CxfKb7A8</td>\n",
       "      <td>2017-12-14 09:31:00</td>\n",
       "      <td>200</td>\n",
       "      <td>None</td>\n",
       "      <td>0.0015</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>stock_cn</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Order_yzdenutm</th>\n",
       "      <td>Acc_blCX6GQy</td>\n",
       "      <td>700</td>\n",
       "      <td>by_money</td>\n",
       "      <td>&lt;bound method QA_Account.receive_deal of &lt; QA_...</td>\n",
       "      <td>000001</td>\n",
       "      <td>0.00025</td>\n",
       "      <td>2017-12-14</td>\n",
       "      <td>2017-12-14 09:31:00</td>\n",
       "      <td>day</td>\n",
       "      <td>stock_cn</td>\n",
       "      <td>...</td>\n",
       "      <td>Order_yzdenutm</td>\n",
       "      <td>2017-12-14 09:31:00</td>\n",
       "      <td>200</td>\n",
       "      <td>None</td>\n",
       "      <td>0.0015</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>stock_cn</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               account_cookie  amount amount_model  \\\n",
       "order_id                                             \n",
       "Order_CxfKb7A8   Acc_fihwWguQ     700     by_money   \n",
       "Order_yzdenutm   Acc_blCX6GQy     700     by_money   \n",
       "\n",
       "                                                         callback    code  \\\n",
       "order_id                                                                    \n",
       "Order_CxfKb7A8  <bound method QA_Account.receive_deal of < QA_...  000001   \n",
       "Order_yzdenutm  <bound method QA_Account.receive_deal of < QA_...  000001   \n",
       "\n",
       "                commission_coeff        date             datetime frequence  \\\n",
       "order_id                                                                      \n",
       "Order_CxfKb7A8           0.00025  2017-12-14  2017-12-14 09:31:00       day   \n",
       "Order_yzdenutm           0.00025  2017-12-14  2017-12-14 09:31:00       day   \n",
       "\n",
       "               market_type  ...     realorder_id         sending_time status  \\\n",
       "order_id                    ...                                                \n",
       "Order_CxfKb7A8    stock_cn  ...   Order_CxfKb7A8  2017-12-14 09:31:00    200   \n",
       "Order_yzdenutm    stock_cn  ...   Order_yzdenutm  2017-12-14 09:31:00    200   \n",
       "\n",
       "                strategy tax_coeff towards  trade_id transact_time      type  \\\n",
       "order_id                                                                       \n",
       "Order_CxfKb7A8      None    0.0015       1      None          None  stock_cn   \n",
       "Order_yzdenutm      None    0.0015       1      None          None  stock_cn   \n",
       "\n",
       "                user  \n",
       "order_id              \n",
       "Order_CxfKb7A8  None  \n",
       "Order_yzdenutm  None  \n",
       "\n",
       "[2 rows x 24 columns]"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "market.broker[QA.BROKER_TYPE.BACKETEST].order_handler.order_queue()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[]"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "market.broker[QA.BROKER_TYPE.BACKETEST].order_handler.order_queue.trade_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>account_cookie</th>\n",
       "      <th>amount</th>\n",
       "      <th>amount_model</th>\n",
       "      <th>callback</th>\n",
       "      <th>code</th>\n",
       "      <th>commission_coeff</th>\n",
       "      <th>date</th>\n",
       "      <th>datetime</th>\n",
       "      <th>frequence</th>\n",
       "      <th>market_type</th>\n",
       "      <th>...</th>\n",
       "      <th>realorder_id</th>\n",
       "      <th>sending_time</th>\n",
       "      <th>status</th>\n",
       "      <th>strategy</th>\n",
       "      <th>tax_coeff</th>\n",
       "      <th>towards</th>\n",
       "      <th>trade_id</th>\n",
       "      <th>transact_time</th>\n",
       "      <th>type</th>\n",
       "      <th>user</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>order_id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>0 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [account_cookie, amount, amount_model, callback, code, commission_coeff, date, datetime, frequence, market_type, money, order_id, order_model, price, realorder_id, sending_time, status, strategy, tax_coeff, towards, trade_id, transact_time, type, user]\n",
       "Index: []\n",
       "\n",
       "[0 rows x 24 columns]"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "market.broker[QA.BROKER_TYPE.BACKETEST].order_handler.order_queue.pending"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ON TRADE\n",
      "[]\n"
     ]
    }
   ],
   "source": [
    "market._trade(QA.QA_Event(broker_name=QA.BROKER_TYPE.BACKETEST))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ON QUERY\n",
      "[['000001' 13.15 13.31 12.91 13.0 1001998.0 1311131904.0\n",
      "  Timestamp('2017-12-14 00:00:00')]\n",
      " ['000001' 12.9 12.93 12.67 12.72 1099952.0 1405372032.0\n",
      "  Timestamp('2017-12-15 00:00:00')]\n",
      " ['000001' 12.73 12.91 12.64 12.75 805464.0 1029422784.0\n",
      "  Timestamp('2017-12-18 00:00:00')]\n",
      " ['000001' 12.79 13.32 12.74 13.28 2397943.0 3138687488.0\n",
      "  Timestamp('2017-12-19 00:00:00')]\n",
      " ['000001' 13.2 13.31 13.13 13.26 1106245.0 1463802112.0\n",
      "  Timestamp('2017-12-20 00:00:00')]\n",
      " ['000001' 13.18 13.68 13.16 13.54 1485203.0 2005617664.0\n",
      "  Timestamp('2017-12-21 00:00:00')]\n",
      " ['000001' 13.5 13.63 13.45 13.52 742900.0 1004525760.0\n",
      "  Timestamp('2017-12-22 00:00:00')]\n",
      " ['000001' 13.52 13.86 13.16 13.25 1585567.0 2145040640.0\n",
      "  Timestamp('2017-12-25 00:00:00')]\n",
      " ['000001' 13.26 13.69 13.19 13.66 1123688.0 1510826240.0\n",
      "  Timestamp('2017-12-26 00:00:00')]\n",
      " ['000001' 13.58 13.78 13.19 13.29 1366566.0 1848164992.0\n",
      "  Timestamp('2017-12-27 00:00:00')]\n",
      " ['000001' 13.28 13.46 13.02 13.21 1553030.0 2052944512.0\n",
      "  Timestamp('2017-12-28 00:00:00')]\n",
      " ['000001' 13.21 13.43 13.1 13.3 982915.0 1303222016.0\n",
      "  Timestamp('2017-12-29 00:00:00')]]\n"
     ]
    }
   ],
   "source": [
    "market.query_data(broker_name=QA.BROKER_TYPE.BACKETEST,frequence=QA.FREQUENCE.DAY,market_type=QA.MARKET_TYPE.STOCK_CN,\n",
    "                 code='000001',start='2017-12-14',end='2017-12-30')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
